﻿//-----------------------------------------------------------------------
// <copyright file="SceneToolInputData.cs" company="Nathan Miller">
// Copyright (c) Nathan Miller.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
// 
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// </copyright>
//-----------------------------------------------------------------------
namespace TileTool.Editor.Tool.Scene
{
    using System;
    using TileTool.Input;
    using TileTool.Render;

    /// <summary>
    /// Wrapper class which contains input data that is useful for scene
    /// tools.
    /// </summary>
    public class SceneToolInputData
    {
        #region Constructor

        /// <summary>
        /// Constructor for the input data. All params must be non-null.
        /// </summary>
        /// <param name="canvas">Canvas where the input event came from.</param>
        /// <param name="camera">Camera for the input event.</param>
        /// <param name="inputData">Input event data.</param>
        public SceneToolInputData(ICanvas canvas, ICamera camera, InputData inputData)
        {
            if (canvas == null)
            {
                throw new ArgumentNullException("canvas", "Request must be non-null.");
            }

            if (camera == null)
            {
                throw new ArgumentNullException("camera", "Request must be non-null.");
            }

            if (inputData == null)
            {
                throw new ArgumentNullException("inputData", "Request must be non-null.");
            }

            this.Canvas = canvas;
            this.Camera = camera;
            InputData = inputData;
        }

        #endregion

        #region Properties - Public

        /// <summary>
        /// Gets the canvas for the input event.
        /// </summary>
        public ICanvas Canvas
        {
            get;
            private set;
        }

        /// <summary>
        /// Gets the camera for the input event.
        /// </summary>
        public ICamera Camera
        {
            get;
            private set;
        }

        /// <summary>
        /// Gets the input data for the input event.
        /// </summary>
        public InputData InputData
        {
            get;
            private set;
        }

        #endregion
    }
}
